<template>
  <div>
    <a @click="baidu('百度', $event)" href="http://www.baidu.com">百度</a>
    <a @click="sina" href="http://www.sina.com">新浪</a>
  </div>
</template>

<script>
export default {
  methods: {
    baidu(msg, e) {
      console.log(msg);
      e.preventDefault();
    },
    sina(e) {
      // console.log(1);
      e.preventDefault();
    },
  },
};
</script>

<style lang="scss" scoped>
</style>